#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
	int n;
	float sum = 0;
	scanf("%d", &n);
	if (n > 0 && n <= 10000)
	{
		if (n < 150)
			sum = n * 0.4463;
		else if (n >= 151 && n <= 400)
			sum = 150 * 0.4463 + (n - 150) * 0.4663;
		else if (n >= 401)
			sum = 150 * 0.4463 + 250 * 0.4663 + (n - 400) * 0.5663;
	}
	printf("%.1f", sum);
	return 0;
}